home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / mxutil / tspak17 / tspak.doc < prev   
Text File  |  1994-09-11  |  61KB  |  1,291 lines

  1.        Tandy DAC Sound Package
  2.        Version 1.7
  3.        September 11, 1994
  4.  
  5.        Send comments, bug reports to:
  6.  
  7.        Jeffrey L. Hayes
  8.        130 Forest Ave., Lot 1
  9.        Orono, Me. 04473
  10.        (207) 866-7903
  11.        Internet:  tvdog@delphi.com
  12.  
  13.  
  14.        Contents
  15.        --------
  16.  
  17.        1.  Introduction
  18.        2.  Playwav
  19.        3.  Recwav
  20.        4.  Ppwav
  21.        5.  Raw2wav
  22.        6.  Snd2sam
  23.        7.  Setdac
  24.        8.  Piano
  25.        9.  Work in Progress
  26.  
  27.  
  28.        Introduction
  29.        ------------
  30.  
  31.        As noted in the file Tandac.doc (included in this package), 
  32.        there is a general lack of software support for the built-in 
  33.        digital-to-analog converter included by Tandy with several 
  34.        models of the 1000 and 2500.  Generally speaking, only Tandy 
  35.        and some game programmers have written programs for the chip.  
  36.        The few programs that support the Tandy DAC include DeskMate 
  37.        Music and Sound, which were bundled with the machine, and a 
  38.        Windows 3.1 sound driver for the 2500-series, available from 
  39.        Radio Shack (this driver will also work on the 1000RSX).
  40.  
  41.        This package is intended to supplement, not replace, the many 
  42.        good sound and music programs out there.  There is no point in 
  43.        trying to redo something that has already been done better than 
  44.        I could do it.  This package, therefore, needs several free- 
  45.        and shareware programs available separately to be most useful.  
  46.        Where possible, I make note of other programs that are 
  47.        available.
  48.  
  49.        Sox, the universal sound sample translator, is an extremely 
  50.        useful program, so useful that it is a "must have" if you 
  51.        intend to do anything with sound.  Sox can convert most any 
  52.        sound sample format you are likely to encounter.  It can also 
  53.        perform several effects on the sound file, including adjusting 
  54.        the sampling rate, mixing channels, high-, low- and bandpass 
  55.        filtering, adjusting the volume, and echo and vibrato effects.  
  56.        This program is freeware.
  57.  
  58.        MultiPlayer is a music module player that supports a wide 
  59.        variety of sound cards; unfortunately, the Tandy sound chip is 
  60.        not one of them.  MultiPlayer can play many module formats, 
  61.        including MOD, 6CM, 8CM, WOW, STM, S3M, 669, OKT, MED, and P16.  
  62.        This program requires a 286; module players that don't require 
  63.        a 386 are scarce.  MultiPlayer's usefulness to Tandy owners 
  64.        lies in the fact that it can play modules to a DAC on a 
  65.        parallel port and to disk.  It can also play to the PC speaker, 
  66.        but this is not recommended since the sound quality is 
  67.        extremely poor.  With Setdac (described below), you can play 
  68.        modules in real time on the Tandy DAC, but the quality will be 
  69.        mediocre because of the low sampling rate you can use.  To get 
  70.        better quality, select "Raw sample file" as the output device, 
  71.        convert the module into an 8-bit unsigned sample file at up to 
  72.        22kHz, use Raw2wav (below) to convert the .raw to a .wav, and 
  73.        use Playwav (also below) to play the .wav.  MultiPlayer is 
  74.        freeware also.  NOTE:  DO NOT USE MULTIPLAYER V.2.11.  THIS 
  75.        VERSION HAS A BUG IN THE COVOX DRIVER.
  76.  
  77.        ModEdit is a music module editor for 4-channel Amiga module 
  78.        files.  4-channel .mod's are the least common denominator among 
  79.        standard music module types; any module player in existence, 
  80.        for whatever platform, should be able to play them (although 
  81.        the module format originates with the Amiga, it is now an 
  82.        industry standard).  You can use Setdac to listen to your 
  83.        modules while you edit them.  With Snd2sam, you can use 
  84.        Sound.pdm to create and edit .mod samples, including looped 
  85.        samples.  ModEdit is shareware; registration is $15.
  86.  
  87.        Conv2snd, by Ken Kudut, is a utility to convert RIFF WAVE and 
  88.        other sound file formats to .snd so that they can be edited 
  89.        with Tandy's Sound.pdm sound editor.  It comes with another 
  90.        program, Snd2wav, which converts .snd to .wav, so that sounds 
  91.        edited with Sound.pdm can be shared with people on non-Tandy 
  92.        machines.  This program is freeware and comes with Turbo Pascal 
  93.        source.  (I did the modifications to v.2.00 of Conv2snd.)
  94.  
  95.        Playsnd, by John Ball, plays Tandy .snd, Creative Labs .voc, 
  96.        .wav, Amiga .iff, and headerless unsigned PCM files (such as 
  97.        Mac .snd) on the Tandy DAC or PC speaker.  The author also has 
  98.        a program, Sbplay, to play the same types of sound files (and 
  99.        several others) on the Soundblaster or PC speaker.  Both 
  100.        programs are free (Sbplay requires free registration).
  101.  
  102.        David Stewart's Sampler package records and plays raw 
  103.        headerless samples at near 11kHz and features voice activation.  
  104.        The registered version purportedly provides keyboard activation 
  105.        (nice because the voice activation seems to have a will of its 
  106.        own) and allows the sampling rate to be varied.  This program 
  107.        is shareware.
  108.  
  109.        Sean Haynes' Tndsound program records and plays sound files in 
  110.        its own proprietary format.  The unregistered version of this 
  111.        package does not appear to be crippled.  There is a menu-driven 
  112.        interface.  This program offers sound filtering and control 
  113.        over the playback volume.  Overall, I would say that Tndsound 
  114.        is better than Sampler.  One drawback to this program is that 
  115.        it doesn't know how to compute the sampling rate in Hz from the 
  116.        DAC divider value, so it's hard to select a standard sampling 
  117.        rate (you have to specify the rate as a meaningless number).  
  118.        The default rate is around 9kHz.  This program is shareware.
  119.  
  120.        John W. Ratcliffe's IBM Digitized Sound Package contains a TSR, 
  121.        Tansltl.exe, and a program, Play.exe, to play sounds in a batch 
  122.        file.  This program is commercial ($19.95); it offers sound 
  123.        compression and a number of other utilities (but recording is 
  124.        not one of them).
  125.  
  126.        Tandy's own Sound.pdm deserves special mention.  Sound allows 
  127.        you to record, play, and edit sound files, using a graphical 
  128.        interface (the sound waveform is displayed).  The more I see of 
  129.        Sound.pdm, the more I like it.  Sound.pdm runs under Tandy's 
  130.        proprietary DeskMate interface, which is one of its limita- 
  131.        tions; on some systems, DeskMate is in ROM and is lost when one 
  132.        disables the ROM to upgrade the DOS version (DOS 3.3 is also in 
  133.        ROM).  The other limitation is that sound files edited with 
  134.        Sound.pdm must fit in conventional RAM - but there is still a 
  135.        great deal of use for the program for short files, such as .mod 
  136.        samples (see Snd2sam).  This program was bundled with several 
  137.        Tandy models; perhaps they will sell you a copy at Radio Shack 
  138.        if you tell them you have a 1000TL (or 1000RSX if you have that 
  139.        or a 2500) and you lost your disk (the standard fee is $5).  If 
  140.        you don't have DeskMate, there is a generic IBM-compatible 
  141.        version you can buy, also at Radio Shack (it will be a special 
  142.        order; I don't know the price).
  143.  
  144.        It should be mentioned that if you plan on using the sound 
  145.        capabilities of the Tandy, you should get a pair of amplified 
  146.        speakers (~$25-30) at your local Radio Shack and plug them into 
  147.        the earphone jack on your computer.  The built-in speaker does 
  148.        not produce very good sound.
  149.  
  150.        WARNING:  CONNECTING AN AMPLIFIED INPUT (DIRECT LINE FROM 
  151.        RADIO, ETC.) TO THE MICROPHONE JACK ON YOUR COMPUTER CAN DAMAGE 
  152.        THE SOUND CIRCUITRY.  If you want to connect a stereo, tape 
  153.        deck, or other device directly to the computer's sound input 
  154.        via a dubbing cable, you *must* set a jumper inside the 
  155.        machine.  Check your owner's manual before connecting any 
  156.        amplified input - otherwise you will fry the sound chip and 
  157.        possibly more.
  158.  
  159.        This version includes eight programs, six of which are (hope- 
  160.        fully) useful, one (Piano) which is a toy, and one (Testdiv) 
  161.        which is mainly for programmers.  Most of the programs are 
  162.        described in the following sections; see Tandac.doc for infor- 
  163.        mation about Testdiv.
  164.  
  165.  
  166.        Playwav
  167.        -------
  168.  
  169.        Playwav plays .wav files on the Tandy sound chip.  For sample 
  170.        files in other formats, use Sox (see above) to convert to .wav.  
  171.        The RIFF WAVE format, introduced with Windows version 3, is 
  172.        among the most common sound formats out there.  Playwav 
  173.        requires about 195k of free RAM for its sound buffers.  
  174.        Arbitrarily large sound files can be played (the file is read 
  175.        from disk while it's being played).
  176.  
  177.        The WAVE format specification describes many types of sound 
  178.        files and is a very flexible format.  However, only the 
  179.        simplest type of .wav format is ever actually used, and that is 
  180.        what this program supports.  Specifically, with this program 
  181.        you can play .wav files in Microsoft PCM format consisting of a 
  182.        single data block with up to 16 bits per channel in mono or 
  183.        stereo, at sampling rates up to 65535Hz.  This encompasses 
  184.        99.9% of all .wav files in existence.  (One format that is 
  185.        increasingly common is Microsoft ADPCM - Playwav does not yet 
  186.        recognize that format.)
  187.  
  188.        To use the program, just type its name at the DOS command line 
  189.        followed by the name of the .wav file to be played, e.g.:
  190.  
  191.            PLAYWAV FORCE_WI.WAV
  192.  
  193.        On my system, this will play a sound file from Star Wars that 
  194.        says "Remember, the Force will be with you, always."  If the 
  195.        .wav is not in the current directory, include the drive and/or 
  196.        path.
  197.  
  198.        Playwav will then play the sound file.  You can abort playback 
  199.        by hitting <control>-C.
  200.  
  201.        There are no command-line options, and Playwav won't display 
  202.        anything on the screen unless something goes wrong.  Here are 
  203.        the possible error messages:
  204.  
  205.            Tandy DAC not detected.
  206.  
  207.        You get this message if you attempt to run this program on a 
  208.        computer that does not have a Tandy sound chip.  The 3-voice 
  209.        tone and noise generator included with older 1000-series models 
  210.        is not sufficient, and you will get this message if you try 
  211.        Playwav on one of those.  The 1000SL's, TL's and RL's and some 
  212.        later Tandy models have the necessary sound chip.
  213.  
  214.            Must specify input .wav file.
  215.  
  216.        You get this message if you do not specify a .wav file to be 
  217.        played on the command line.
  218.  
  219.            Open failed on input file.
  220.  
  221.        You get this message if the file you specified does not exist.  
  222.        There is also a remote possibility that open may fail for 
  223.        another reason, such as a sharing conflict on a network.  
  224.        Playwav requires that you specify the extension.
  225.  
  226.            Error reading .wav file.
  227.  
  228.        You get this message if DOS reports an error reading from the 
  229.        file after it has been opened.  You may have a bad spot on your 
  230.        disk, or the disk structure may be corrupted.
  231.  
  232.            .wav file invalid or unsupported type.
  233.  
  234.        This message indicates that the .wav file you specified does 
  235.        not have a .wav header that Playwav recognizes.  Either the 
  236.        file you specified is not a .wav file, or the file is corrupt, 
  237.        or it is one of the rare types of .wav files that Playwav does 
  238.        not support.
  239.  
  240.            Unsupported sample size or number of channels in .wav file.
  241.  
  242.        You get this message when the .wav header indicates that the 
  243.        .wav file has more than 16 bits per channel or more than 2 
  244.        channels.  Another possibility is that the .wav is corrupt.  If 
  245.        the .wav is valid, you can use Ppwav to convert it to something 
  246.        that Playwav can play (see below).
  247.  
  248.            Output underflow - unable to maintain sampling rate.
  249.            Copy .wav to hard disk or RAM disk and try again,
  250.            convert to 8-bit mono, or convert to reduce sampling
  251.            rate.
  252.  
  253.        This message indicates that your computer is unable to generate 
  254.        samples as fast as they need to be played.  Although Playwav is 
  255.        written in hand-optimized assembler, your hardware may limit 
  256.        the types of .wav's you can play.  Playwav was written and 
  257.        tested on a 1000TL.  On this machine, I have played a 16-bit 
  258.        stereo 44kHz .wav from the hard drive, but the best that I can 
  259.        do from a floppy is 8-bit mono 11kHz.  The SL is a slower 
  260.        machine and may not be able to do as well.  If you get this 
  261.        message, you can use Ppwav to convert the .wav so that you can 
  262.        play it (see below).
  263.  
  264.  
  265.        Recwav
  266.        ------
  267.  
  268.        Recwav records .wav files on the Tandy sound chip.  The program 
  269.        requires about 97k of free RAM.  Arbitrarily large sound files 
  270.        can be recorded, subject to disk space limitations (the file is 
  271.        written to disk while it records).  The output file is a RIFF 
  272.        WAVE file in 8-bit mono Microsoft PCM format.  **SEE THE 
  273.        WARNING ABOVE REGARDING AMPLIFIED INPUT.**
  274.  
  275.        To use the program, type its name, followed by optional 
  276.        switches, followed by the name of the output file, for example:
  277.  
  278.            RECWAV MINABIRD
  279.            RECWAV /S ASOUND.
  280.            RECWAV /30000 C:\SOUNDS\SLOWSND
  281.            RECWAV /N NOCHECK.WAV
  282.  
  283.        The following options are recognized:
  284.  
  285.            /S means to compute the input sampling rate as for a 
  286.        1000SL.  The SL must be programmed differently from other 
  287.        machines when recording sounds.  Recwav will attempt to detect 
  288.        an SL if you do not specify either /S or /T on the command 
  289.        line; this switch overrides the detection mechanism.  Note that 
  290.        Recwav may not detect an SL/2, so this switch may be useful in 
  291.        that case.  By default (if /N is not specified) the sampling 
  292.        rate will be adjusted by timing the chip, so /S will only save 
  293.        a little time at startup.
  294.  
  295.            /T means to compute the input sampling rate as for a 
  296.        1000TL.  This is the default for models other than the 1000SL.  
  297.        As with /S, /T overrides the detection mechanism for an SL.  /S 
  298.        and /T change the rate at which recording is done, /S causing a 
  299.        faster rate to be used - if /N is also specified.  If /N is not 
  300.        specified, Recwav will adjust the computed rate by timing the 
  301.        sound chip, as noted above.
  302.  
  303.            /N tells Recwav to skip adjusting the sampling rate.  The 
  304.        Tandy DAC can only record at a discrete set of rates, and by 
  305.        default Recwav will look for an available rate close to the 
  306.        specified one (or to the default rate of 11000Hz if you don't 
  307.        specify a rate).  The .wav header will be adjusted to match the 
  308.        rate chosen.
  309.            If /N is specified, on the other hand, Recwav will attempt 
  310.        to select an available rate close to the one specified, but it 
  311.        will not adjust the rate or change the .wav header.  The 
  312.        adjustment is much faster now than in the previous version, 
  313.        taking approximately one second on average (if starting with 
  314.        the proper estimate for the model involved).  Recwav will still 
  315.        start up a little faster with /N, but sounds will play back 
  316.        closer to the true pitch if /N is not specified.
  317.            /N will mainly be useful in cases where the system timer 
  318.        has been speeded up from the default rate of 18.2 ticks per 
  319.        second by some TSR.  To do its adjustment, Recwav must take 
  320.        over the timer tick interrupt; when done, Recwav changes the 
  321.        rate back to the default rate since there is no way to know if 
  322.        the timer was speeded up before.  Likely culprits here are GW- 
  323.        Basic and multi-tasking environments such as DesqView; in this 
  324.        case /N is mandatory.
  325.  
  326.            /nnnn is an optional sampling rate in Hz; for example, 
  327.        /11025 or /44100.  A rate between 875 and 65535 may be 
  328.        specified.  The default rate is 11000.
  329.            Higher sampling rates generally imply better sound quality, 
  330.        at the cost of greater disk space - the rate is equal to the 
  331.        number of bytes per second of sound that will be written to 
  332.        your disk.  The default rate is adequate for speech.  If 
  333.        recording music, you may want to specify a higher rate.  
  334.        Standard rates are 5513Hz, 11025Hz, 22050Hz, and 44100Hz, but 
  335.        you can select any rate in the allowed range.
  336.            When selecting a sampling rate, note that your disk must be 
  337.        fast enough to accept data at the specified rate.  This is most 
  338.        likely to be a problem when recording to a floppy.  If your 
  339.        disk can't keep up, Recwav will abort recording, display a 
  340.        message (see below), and delete the output file.  On a 1000TL 
  341.        with a reasonably fast hard drive, I can use the full range (up 
  342.        to about 63kHz), but when recording to a floppy, the available 
  343.        rate drops to less than 9000Hz.
  344.            As note above, Recwav will normally adjust the rate you 
  345.        specify to match one of the sound chip's available rates.
  346.  
  347.        The output filename is required and can include drive and path 
  348.        if you want.  If you do not specify an extension, it defaults 
  349.        to .wav; to specify a file without an extension, end its name 
  350.        with a period.
  351.  
  352.        You might notice a short "hitch" in the sound every few seconds 
  353.        when playing back a recording.  It may help to record to a RAM 
  354.        disk.
  355.  
  356.        When you run Recwav, it displays the following:
  357.  
  358.            I:\>recwav /8000 a:test
  359.            Adjusting sampling rate....
  360.            Recording RIFF WAVE file at 8082Hz.
  361.            Press a key to begin recording.
  362.  
  363.        If /N was specified, you would see:
  364.  
  365.            I:\>recwav /n /8000 a:test
  366.            Sampling rate not adjusted.
  367.            Recording RIFF WAVE file at 8000Hz.
  368.            Press a key to begin recording.
  369.  
  370.        When ready to begin, press any key.  Recwav will then say:
  371.  
  372.            Press a key to stop recording.
  373.  
  374.        Hit a key when you want to stop.  This version will stop 
  375.        immediately (i.e., recording is no longer done in 32kB chunks).  
  376.        If all went well, the program will display:
  377.  
  378.            Recording complete.
  379.  
  380.        ... and Recwav will return you to the DOS prompt.
  381.  
  382.        If things _don't_ go well, one of the following error messages       
  383.        will be displayed:
  384.  
  385.            This program requires a Tandy DAC chip.
  386.  
  387.        This message will be displayed if Recwav fails to detect the 
  388.        needed sound chip in your system.  The 1000SL, 1000TL, and 
  389.        several later models of the Tandy 1000 and 2500 have the 
  390.        necessary chip.  The 3-voice tone and noise generator included 
  391.        with older 1000 models is not sufficient.
  392.  
  393.            Recwav - .wav recorder for Tandy
  394.            Syntax:
  395.              RECWAV [/S] [/T] [/N] [/nnnn] <filename>
  396.  
  397.        This message is displayed if you invoke Recwav without 
  398.        parameters.  At least one parameter (the output filename) is 
  399.        required.
  400.  
  401.            You forgot to specify an output file.
  402.  
  403.        This message is displayed if you specify one or more switches, 
  404.        but omit the filename.
  405.  
  406.            Disk error - recording deleted.
  407.  
  408.        This message is displayed in the event of a file error of some 
  409.        sort.  This indicates that the logical structure of the disk is 
  410.        corrupt - run Chkdsk.  As indicated, Recwav will attempt to 
  411.        delete the output file in this case, but it probably won't be 
  412.        completely successful.
  413.  
  414.            Disk full - recording halted.
  415.  
  416.        This message is displayed if a full disk is detected while 
  417.        recording.  The output file is kept in this case.  You get a 
  418.        file as large as will fit on the disk.
  419.  
  420.  Input overflow - unable to maintain sampling rate.  Record to a hard disk
  421.  or RAM disk, or specify a lower rate.  Recording deleted.
  422.  
  423.        This message indicates that your disk drive is unable to accept 
  424.        data as fast as the sound chip is supplying it.  The output 
  425.        file is deleted.  As noted above, you are most likely to get 
  426.        this message when recording to a floppy.
  427.            Note that overflow will not occur if you record less than 
  428.        64k of sound, so you can record short snippets of sound at a 
  429.        higher rate than your disk would otherwise allow.
  430.  
  431.            Runtime error 003 at 0000:10B2.
  432.  
  433.        This cryptic message indicates that a critical error (i.e., one 
  434.        of the things that causes "Abort, Retry, Ignore") has occurred 
  435.        - such as taking the floppy out of the drive while recording to 
  436.        it.  Recwav intercepts critical errors to some extent, in that 
  437.        the prompt is not displayed, but you still get this message.  
  438.        If you see this, a partial file may have been written to the 
  439.        disk, creating a loose chain in the FAT.  After verifying that 
  440.        your disk is good, run Chkdsk/f to convert the loose chain to a 
  441.        file, and delete the file.  (Maybe some bright programmer can 
  442.        tell me how to deal with this in Turbo Pascal?)
  443.  
  444.        Finally, the following can occur:
  445.  
  446.            I:\>recwav /n d:test
  447.            Sampling rate not adjusted.
  448.            Recording RIFF WAVE file at 11000Hz.
  449.            Unable to create file "d:test.wav".
  450.  
  451.        On my system, D: is a read-only ROM drive, and no new files can 
  452.        be created there.  You can get this message for a number of 
  453.        other reasons:  attempting to write to a write-protected 
  454.        floppy, attempting to overwrite an existing read-only file, or 
  455.        just mistyping (i.e., specifying an invalid filename).
  456.  
  457.  
  458.        Ppwav
  459.        -----
  460.  
  461.        Ppwav (preprocess .wav) performs 3 types of conversions of a 
  462.        .wav file to reduce its size.  All of these conversions can be 
  463.        done with Sox (see above), but Ppwav is much faster and easier 
  464.        to use.  Ppwav needs about 53k of free RAM for its buffers.
  465.  
  466.        To use Ppwav, type its name followed by the input file name and 
  467.        the output file name, e.g.:
  468.  
  469.            PPWAV PING1.WAV PG.WAV
  470.  
  471.        On my system, this will start up Ppwav on PING1.WAV, a 16-bit 
  472.        stereo 44kHz .wav and create a new sound file, PG.WAV.  (In 
  473.        case you're wondering, PING1.WAV is a sonar ping taken from the 
  474.        movie "Hunt for Red October.")
  475.  
  476.        Ppwav will then display some statistics on the input file, for 
  477.        example:
  478.  
  479.            Input file:  PING1.WAV
  480.                    2 channels
  481.                    44100 samples per second (Hz)
  482.                    16 bits per channel
  483.                    samples are signed
  484.  
  485.        It will then ask you what conversions you want to do:
  486.  
  487.                    Mix to mono? (Y/n)
  488.               Convert to 8-bit? (Y/n)
  489.            Halve sampling rate? (y/N)
  490.  
  491.        The first two conversions are the default, as indicated by the 
  492.        uppercase "Y".  They will be done unless you enter "n" or "N" 
  493.        at the prompt.  The last conversion will not be done unless you 
  494.        enter "y" or "Y".  The conversion may take a couple minutes.
  495.  
  496.        All of these conversions will reduce the size of the file and 
  497.        make it easier for Playwav to play it if you got the "Output 
  498.        underflow" message.  (That message is the reason Ppwav exists.)  
  499.        With the Tandy DAC, mixing to mono and converting to 8-bit do 
  500.        not affect the sound quality since Playwav has to do that 
  501.        anyway to play the sound; 8-bit mono sound is all the Tandy 
  502.        chip supports.  Halving the sampling rate will adversely affect 
  503.        the sound quality, however, and you should only do this as a 
  504.        last resort.  I find that 22kHz is about the minimum for 
  505.        acceptable music, and 11kHz for speech.  Halving the sampling 
  506.        rate is done by discarding every other sample.
  507.  
  508.        If you haven't noticed, standard sampling rates are 5.5kHz, 
  509.        11kHz, 22kHz and 44kHz.  44kHz 16-bit stereo is what audio CD's 
  510.        are recorded at.  Both Playwav and Ppwav will handle other 
  511.        sampling rates, however.  Sun .au files are recorded at 8kHz, 
  512.        and Playwav will play them after Sox converts them to .wav.
  513.  
  514.        Ppwav can also handle some rare .wav types that Playwav does 
  515.        not:  sampling rates greater than 65535Hz, more than 2 
  516.        channels, and more than 16 bits per channel.  At least I think 
  517.        it will, it's supposed to.  I've never seen a .wav like that.  
  518.        It will not handle all possible .wav's, however (just all that 
  519.        you are likely to see).
  520.  
  521.        Like Playwav, Ppwav doesn't display anything on the screen 
  522.        unless something goes wrong.  Here are the error messages:
  523.  
  524.            Usage: PPWAV <input file> <output file>
  525.            - see docs for details.
  526.  
  527.        You get this message if you don't specify an input file and an 
  528.        output file on the command line.  There is no default for the 
  529.        output file; you have to specify it.
  530.  
  531.            Error opening input file.
  532.  
  533.        You get this message if the file you specified as the input 
  534.        file does not exist.  As with Playwav, there is a remote 
  535.        possibility of some other cause, but probably you mistyped.
  536.  
  537.            Unable to create output file.
  538.  
  539.        DOS reported that the output file could not be created.  
  540.        Probably the root directory is full on the disk you specified 
  541.        (if you specified the root directory), or the disk is full.
  542.  
  543.            Error reading input .wav file.
  544.  
  545.        DOS reported an error reading the input file.  This probably 
  546.        means that the disk structure is corrupt, and you should run 
  547.        Chkdsk to find out.  Unlike Playwav, Ppwav does not replace the 
  548.        default critical error handler, so if you have a bad spot on 
  549.        the disk, you will get the infamous "Abort, Retry, Ignore, 
  550.        Fail?" message instead of this one.
  551.  
  552.            Error writing output .wav file.
  553.  
  554.        The disk structure is probably corrupt.  Ppwav ignores a full 
  555.        disk; you just get as much of the output file as will fit.  
  556.        (Playwav will play the fragment, but other players may not.)
  557.  
  558.            Input .wav file invalid or unsupported type.
  559.  
  560.        The input file specified is not a .wav or is corrupt, or it is 
  561.        one of the rare .wav types that Ppwav does not recognize.
  562.  
  563.  
  564.        Raw2wav
  565.        -------
  566.  
  567.        Raw2wav converts 8-bit unsigned raw sample files to .wav by 
  568.        attaching a valid .wav header so that Playwav can play them.  
  569.        This program is intended for use with MultiPlayer (see above).  
  570.        MultiPlayer can convert music modules when "Raw sample file" is 
  571.        specified as the output device.  Since the .raw files produced 
  572.        by MultiPlayer are typically several megabytes in size, this 
  573.        program overwrites the original .raw file in order to save disk 
  574.        space.  Sox can do this conversion, but it is substantially 
  575.        slower and does not overwrite, so you need double the disk 
  576.        space of the original file.  (Raw2wav can also convert Mac .snd 
  577.        or other types of headerless sound files.)
  578.  
  579.        Since the original file is overwritten, it will be corrupted if 
  580.        anything goes wrong.  Copy the file first if you're worried 
  581.        about that.
  582.  
  583.        To use Raw2wav, type its name, optionally followed by the 
  584.        sampling rate, followed by the name of the .raw file to be 
  585.        converted, e.g.:
  586.  
  587.            RAW2WAV FUGUE.RAW
  588.  
  589.        or:
  590.  
  591.            RAW2WAV /11000 ENTRTAIN.RAW
  592.  
  593.        The sampling rate defaults to 22000Hz if not specified; this is 
  594.        the highest sampling rate MultiPlayer supports, and its use is 
  595.        recommended.  Since the .raw file has no header, it is 
  596.        impossible for a player to know how fast the file is to be 
  597.        played if you don't specify it.  It the examples given, 
  598.        FUGUE.RAW is the raw sample file produced by MultiPlayer when 
  599.        playing FUGUE.MOD (Bach's organ fugue in D minor) to the Raw 
  600.        sample file device at 22kHz, and ENTRTAIN.RAW is the file 
  601.        produced by MultiPlayer when playing ENTRTAIN.MOD (Scott 
  602.        Joplin's "The Entertainer") to the Raw sample file at 11kHz.
  603.  
  604.        Raw2wav will ask you to confirm that you want to overwrite the 
  605.        input file:
  606.  
  607.            The input file will be overwritten.  Continue? (Y/n)
  608.  
  609.        As the uppercase "Y" indicates, the default is "yes" if you 
  610.        just hit return; Raw2wav will go on to convert the file.  The 
  611.        input file will be renamed with a ".wav" extension.  If you 
  612.        enter "n" or "N", the following message will be displayed:
  613.  
  614.            Conversion not done.
  615.  
  616.        and the program will terminate without changing the file.
  617.  
  618.        Normally that will be the extent of the user interaction.  If 
  619.        something goes wrong, one of the following error messages will 
  620.        be displayed:
  621.  
  622.            Must specify input .raw file.
  623.  
  624.        You get this message if you don't specify an input file.
  625.  
  626.            Sampling rate must be an integer in the range 875-65535.
  627.  
  628.        You get this message if you specify a sampling rate that is not 
  629.        a number, or if the number you specify is not in the indicated 
  630.        range.  The Tandy sound chip cannot handle sampling rates lower 
  631.        than 875Hz.  Rates higher than 65535Hz are technically 
  632.        possible, but the programs in this package (except Ppwav) do 
  633.        not support those rates because I don't want to deal with 32- 
  634.        bit arithmetic on a 16-bit machine.  (None of these programs 
  635.        contain 80386 instructions, or 80286 instructions for that 
  636.        matter.)  If you actually have a .raw file sampled that high 
  637.        (where did you get it?) you can use Sox to convert it.
  638.  
  639.            Error opening input file for reading.
  640.  
  641.        The input file specified does not exist, or some other error 
  642.        occurred (unlikely).
  643.  
  644.            Seek failed on input file.
  645.  
  646.        DOS reported that it was unable to seek on the input file.  The 
  647.        input file must be a file, not a device, since Raw2wav needs to 
  648.        determine its size for the .wav header.  A corrupt disk 
  649.        structure may also cause this error.
  650.  
  651.            Error opening input file for writing.
  652.  
  653.        DOS reported that the file could not be opened for writing.  
  654.        This probably means that the file is read-only; use Attrib to 
  655.        remove the read-only attribute.
  656.  
  657.            Error reading from file.
  658.  
  659.        This probably indicates a corrupt disk structure.  As with 
  660.        Ppwav, the default critical error handler is not replaced, so 
  661.        if you have a bad spot on the disk you will get "Abort, Retry, 
  662.        Ignore, Fail?" instead of this.
  663.  
  664.            Error writing to file.
  665.  
  666.        DOS reported an error writing to the file.  I don't know how 
  667.        this can happen.  A write-protected disk would cause a critical 
  668.        error instead.
  669.  
  670.            Disk full.
  671.  
  672.        Since only 44 bytes are added to the file during the 
  673.        conversion, this error is very unlikely.  Nevertheless, there 
  674.        it is.
  675.  
  676.            Insufficient memory.
  677.  
  678.        Since Raw2wav is structured as a .com file rather than an .exe, 
  679.        it must check for itself whether it has enough room to work in.  
  680.        Since Playwav and Ppwav are .exe files, DOS checks whether 
  681.        there is enough memory available before loading them, so in 
  682.        their case you would get an error message from DOS, not from 
  683.        the programs themselves.  DOS only guarantees that Raw2wav gets 
  684.        memory equal to its file size; it needs 32k more and checks 
  685.        whether it has it.
  686.  
  687.  
  688.        Snd2sam
  689.        -------
  690.  
  691.        Snd2sam converts the .snd files produced by Sound.pdm (see 
  692.        above) to .mod samples (.sam files) for use with ModEdit (see 
  693.        above) or other Amiga music module editors.  Using Snd2sam, you 
  694.        can use Tandy's excellent Sound editor program to create and 
  695.        edit .mod samples, and Music.pdm to test them in a composition, 
  696.        before converting them to .sam.  If you create instrument files 
  697.        with "sustained" (looped) regions, Snd2sam will preserve the 
  698.        looping information for you - so you can make your own looped 
  699.        .mod samples (for the new-format .snd files used on the 2500's, 
  700.        looping information is not preserved).
  701.  
  702.        Snd2sam can require a lot of memory; it reads the entire .snd 
  703.        file into RAM.  Generally, you should have 350kB or more 
  704.        available.  (Since Sound.pdm requires that .snd files fit into 
  705.        its memory space, and since DeskMate and Sound.pdm require a 
  706.        lot more memory than Snd2sam, I don't think this is a major 
  707.        limitation.)
  708.  
  709.        This program converts a DeskMate Sound.pdm instrument or sound 
  710.        file to one or more .sam files for use with Amiga .mod editors, 
  711.        particularly ModEdit v.3.1.  The input .snd file must be 
  712.        uncompressed.  For each note in the instrument file, two output 
  713.        files are created:  (1) a .sam file, and (2) a .not (ASCII) 
  714.        file giving needed information about the .sam file, including 
  715.        its pitch, large-scale tuning, transposition, and looping   
  716.        parameters.  Since the .sam file is a headerless format, the 
  717.        user is required to enter the information from the .not file 
  718.        manually when using the sample in a .mod editor.
  719.  
  720.        The syntax is:
  721.  
  722.            SND2SAM <.snd file> [<directory>]
  723.  
  724.        The input .snd filename is required and may include drive and 
  725.        path.  If no extension is specified, it defaults to .snd; a 
  726.        file without an extension can by used by ending the name with a 
  727.        period.
  728.  
  729.        The second parameter, which is optional, is the directory where 
  730.        the output .sam and .not files will be placed.  If not 
  731.        specified, it defaults to the current directory.
  732.  
  733.        The output filenames are generated from the input .snd 
  734.        filename.  For the first note, the filename of the .snd file 
  735.        (without drive, path, or extension) is taken, and extensions of 
  736.        .sam and .not are attached.  For the second and subsequent 
  737.        notes, a digit 2-9 or letter A-G is appended to the filename, 
  738.        overwriting the last character of the filename if necessary.  
  739.        For example, if the following is entered (where piano.snd is an 
  740.        instrument file with 3 notes defined):
  741.  
  742.            snd2sam a:piano
  743.  
  744.        The following files will be created in the current directory:
  745.  
  746.            piano.sam
  747.            piano.not
  748.            piano2.sam
  749.            piano2.not
  750.            piano3.sam
  751.            piano3.not
  752.  
  753.        For a note in an instrument file with pitch and sustain set, 
  754.        the .not file will take the following format.  In this example, 
  755.        clarinet.snd has at least one note defined, and note 1 is C3 in 
  756.        Sound.pdm (middle C, or C2 in .mod pitch).
  757.  
  758.            Data for sample file clarinet.sam
  759.            Actual pitch at C2:  G1 finetune +1
  760.  
  761.            Tuning for ModEdit v.3.1:
  762.            Set tuning to:  G2
  763.            Transpose up 1 octave(s).
  764.  
  765.            Tuning for other editors:
  766.            Transpose up 5 semitone(s).
  767.  
  768.            Sample is looped.
  769.            Repeat start:  3828 (1914 words)
  770.            Repeat length:  1356 (678 words)
  771.  
  772.        The .not file begins with the name of the sample file it 
  773.        describes.  The next line gives the actual pitch of the note 
  774.        (in .mod pitch) if played back at period 428.  The pitch given 
  775.        here need not be a valid .mod pitch; it can have an octave 
  776.        number from -1 to 4.  The finetune is somewhat of a mathemati- 
  777.        cal artifact; theoretically, given what I know of the Tandy 
  778.        DAC, the .mod format, and sound frequencies, that is what it 
  779.        should be.  On my TL, however, I find that a finetune of 0 is 
  780.        correct.  You will have to experiment to determine the right 
  781.        finetune for your system, but the finetune you use should be 
  782.        the same for every .snd file you convert.  Likely values to 
  783.        specify are -1 and 0.
  784.  
  785.        The pitch is based on the value you specify in Sound.pdm.  It 
  786.        has to be adjusted for use in a .mod file.  In Sound.pdm, all 
  787.        instrument files are recorded at 11kHz, and note pitches are 
  788.        based on that rate.  To make different notes, Music.pdm plays 
  789.        the note samples back at higher or lower rates, and it bases 
  790.        the playback rate on the pitch of the note at 11kHz (i.e., the 
  791.        pitch at which you recorded the note).  This method of playing 
  792.        different notes, called "frequency shifting," is the same 
  793.        method used on the Amiga (and PC .mod players).  On the Amiga, 
  794.        there is no way to specify the implied note; all notes 
  795.        (samples) are assumed to play at middle C (C2) when played back 
  796.        at 8363Hz.  If you have samples that play at a different pitch 
  797.        at that speed, it is your responsibility to transpose the notes 
  798.        (as if you were scoring for a G or B-flat instrument in an 
  799.        orchestra) before entering them into the module.  The transpos- 
  800.        ition information displayed tells you how many half-steps up or 
  801.        down you must transpose.
  802.  
  803.        ModEdit v.3.1 is an exception to the rule.  This program allows 
  804.        you to set a "large-scale" tuning value for a sample so that 
  805.        notes you enter for that sample are automatically transposed.  
  806.        This feature is unique to ModEdit, as far as I know; it is not 
  807.        part of the .mod format.  If you are using ModEdit, you can use 
  808.        the large-scale tuning attribute to select a base pitch in 
  809.        octave 2, and you will then only have to transpose (if at all) 
  810.        in octaves.
  811.  
  812.        The next few lines in the .not file describe how to set the 
  813.        large-scale tuning in ModEdit so that the pitch will be true (a 
  814.        C will be a C, a D-flat a D-flat, etc.) and so that the range 
  815.        will be as large as possible (a large-scale tuning in octave 2 
  816.        is always selected).  Depending on the .snd file, it may be 
  817.        necessary to transpose the sample's notes one or more octaves 
  818.        in either direction.  In this example, the notes will sound one 
  819.        octave lower than they are written when the tuning is set as 
  820.        indicated, so if working from a musical score one must 
  821.        transpose them up one octave.  Note that you can set the large- 
  822.        scale tuning to G1 (the pitch given as the "actual pitch") and 
  823.        not have to transpose at all - but then the range of the 
  824.        instrument will be limited (see the ModEdit documentation on 
  825.        sample attributes).
  826.  
  827.        Other .mod editors do not offer large-scale tuning; a note 
  828.        played at period 428 (8363Hz) is always displayed as C2.  In 
  829.        this case, the sample's notes will sound 5 semitones lower than 
  830.        they are written, so if working from a musical score one must 
  831.        transpose them up 5 semitones.
  832.  
  833.        The last part is the sample's looping information.  In the 
  834.        example, the first note of clarinet.snd has the sustain region 
  835.        set, and this region will be used as the repeat region for the 
  836.        sample.  The repeat start and length are given in bytes (since 
  837.        ModEdit requires bytes) and in words (which is what the .mod 
  838.        format requires, and what other .mod editors may use).
  839.  
  840.        A word about "sustain" and looping is in order.  In computer 
  841.        music, a note is said to consist of three parts:  the "attack," 
  842.        the swelling of tone at the beginning of the note; the 
  843.        "sustain," the period of constant tone in the middle of the 
  844.        note; and the "decay," the fading of tone at the end of the 
  845.        note.  DeskMate Sound and Music provide for all three; the 
  846.        "attack" and "decay" are implicitly set when you set the 
  847.        "sustain" region.  Tandy's Music.pdm is way ahead of Amiga's 
  848.        Protracker in this and other respects; it was ahead of its 
  849.        time.  A long note is held by repeatedly playing (looping over) 
  850.        the samples in the sustain section.  Amiga .mod files provide 
  851.        for a beginning section (an "attack") and a looped section (a 
  852.        "sustain"), but there is no "decay."
  853.  
  854.        Accordingly, if you convert a note with sustain set, the part 
  855.        of the note after the sustain will be discarded, since on an 
  856.        Amiga it won't be played anyway (or it will be played at the 
  857.        wrong time, when the note starts).  The sustain section in the 
  858.        .snd note will become the looped section in the .mod sample.  
  859.        Also, since the Tandy allows you to set the sustain interval to 
  860.        the byte, while the Amiga only lets you set the looping to the 
  861.        word, the beginning and end of the sustain interval will be 
  862.        rounded off to a multiple of two.  (The file size is also 
  863.        rounded off, for the same reason.)
  864.  
  865.        If you convert one of the new-format .snd files used on the 
  866.        2500-series, the looping information will not be preserved.  I 
  867.        don't know where the sustain information is kept in the new 
  868.        .snd header (my information about new-format .snd's is 
  869.        generally much sketchier than for the old format).  All .not 
  870.        files for new-format .snd's will indicate that the "Sample is 
  871.        not looped."
  872.  
  873.        The .sam file is a headerless format; it contains no informa- 
  874.        tion about large-scale tuning, finetune or looping.  You have 
  875.        to use the .not file to enter these values manually in your 
  876.        .mod editor.
  877.  
  878.        For a sound file, or for a note in an instrument file with no 
  879.        pitch or sustain set, the .not file will take the following 
  880.        format:
  881.  
  882.            Data for sample file meep.sam
  883.            No pitch set
  884.  
  885.            Sample is not looped.
  886.  
  887.        If you didn't set the pitch in the .snd file, Snd2wav can't 
  888.        help you with tuning, so that information is omitted.
  889.  
  890.        The .sam file will consist of a zero word followed by 8-bit 
  891.        signed PCM samples.  (The zero word is another Amiga artifact.)
  892.  
  893.        Known bug:  Snd2sam cannot use a read-only .snd file.  This is 
  894.        a bug in Turbo Pascal's runtime library; it is impossible to 
  895.        open a read-only binary file (one of the great advantages of 
  896.        using high-level languages, I suppose ...).  The bug applies 
  897.        only to files made read-only with the Attrib +r command, not to 
  898.        files on write-protected floppies.  The only way to fix this is 
  899.        to rewrite TP's file handling routines in assembler; I have not 
  900.        done so.  Use Attrib -r to unprotect the .snd file (Snd2sam 
  901.        does not modify the .snd file).
  902.  
  903.        When you run Snd2sam, you will see something like this:
  904.  
  905.            I:\>snd2sam piano test
  906.  
  907.            Snd2sam - DeskMate .snd to Amiga .mod sample conversion program
  908.  
  909.            Reading note information ...
  910.            Reading sample data ...
  911.            Writing to directory "test":
  912.              Writing file piano.sam ...
  913.              Writing file piano.not ...
  914.              Writing file piano2.sam ...
  915.              Writing file piano2.not ...
  916.              Writing file piano3.sam ...
  917.              Writing file piano3.not ...
  918.            Done.
  919.  
  920.        It will take only a few seconds on a hard drive.  As always, 
  921.        things can go wrong, and Snd2sam will provide a message if they 
  922.        do.  Here's one:
  923.  
  924.            Syntax:
  925.              SND2SAM <.snd file> [<output directory>]
  926.  
  927.        You get this message if you invoke Snd2sam without parameters.  
  928.        The input .snd file name is required.
  929.  
  930.            Unable to open file:
  931.              qqq.snd
  932.  
  933.        File qqq.snd does not exist.  You also get this message if you 
  934.        try to convert a read-only .snd file (see bug note above).
  935.  
  936.            File "modnotes." is not an .snd file.
  937.  
  938.        The specified input file is not a DeskMate .snd file or is 
  939.        corrupt.  The .snd extension is used by many different systems 
  940.        for many different types of files.  You should not assume 
  941.        anything about a file with an .snd extension.
  942.  
  943.            Unexpected end-of-file reading .snd header of file:
  944.              qqq.snd
  945.  
  946.        The .snd file is corrupt or truncated, or the specified input 
  947.        file is not an .snd file and is less than 16 bytes in length.
  948.  
  949.            File "h:piano.snd" is compressed.
  950.            Use Sound.pdm to uncompress before converting.
  951.  
  952.        Snd2sam can only convert uncompressed .snd files.  To convert a 
  953.        file for which you get this message, load the file into 
  954.        Sound.pdm and select the Compression option.  Select "No 
  955.        compression," then Save.
  956.  
  957.            Error reading input file - halting.
  958.  
  959.        This means what it says; probably the disk structure is 
  960.        corrupt.
  961.  
  962.            Insufficient memory.
  963.  
  964.        There is not enough memory to read the .snd file in.  You are 
  965.        most likely to get this if you run Snd2sam when shelled out of 
  966.        something.
  967.  
  968.            Note too long for .mod sample - note skipped.
  969.  
  970.        DeskMate Sound and Music set no limits on how long a note 
  971.        sample can be (except that the sample must fit in memory).  
  972.        Amiga .mod samples are limited to a maximum of 128k, and this 
  973.        message indicates that the sample for the note is longer than 
  974.        that.  Note that many PC .mod players will not deal correctly 
  975.        with samples longer than 64k, although Snd2sam will convert 
  976.        them.  If you get this message, you will have to edit the note 
  977.        with Sound.pdm to make it shorter.  In general, if you need to 
  978.        play long notes in your .mod, it is better to create a looped 
  979.        sample - you avoid problems with the PC's 64k limit, and your 
  980.        .mod will take less RAM and disk space.  One note is skipped if 
  981.        you see this message, but if there are other notes in the 
  982.        instrument file they will be converted.
  983.            You cannot create looped samples from new-format .snd 
  984.        files, unfortunately.
  985.  
  986.            Note contains no sound data - note skipped.
  987.  
  988.        This message indicates that the file contains a note that was 
  989.        created but never recorded into.  It is purely informational; 
  990.        the rest of the notes will be converted.
  991.  
  992.            Error writing output file - halting.
  993.  
  994.        As above, this means what it says.  Run Chkdsk to see if your 
  995.        disk is messed up.
  996.  
  997.            Disk full - halting.
  998.  
  999.        Self-explanatory.  If part of the .snd has been converted, the 
  1000.        .snd and .not files for that part will be on the disk.
  1001.  
  1002.            Error creating file "piano.sam" in directory
  1003.            "d:" - halting.
  1004.  
  1005.        The output directory specified is not writeable (in this case, 
  1006.        D: is a ROM disk) or is the root directory and is full.
  1007.  
  1008.            Invalid sample directory:
  1009.              qqq
  1010.  
  1011.        The directory you specified for the output files does not 
  1012.        exist.  Note that the second command-line parameter is a 
  1013.        directory, not a filename.
  1014.  
  1015.        There are a couple other possible error messages.  They 
  1016.        probably indicate that the .snd file is corrupt.
  1017.  
  1018.  
  1019.        Setdac
  1020.        ------
  1021.  
  1022.        Setdac sets up the Tandy DAC to operate in byte-by-byte mode, 
  1023.        as if it were a homemade DAC attached to a parallel port.  By 
  1024.        itself, this program doesn't do anything useful.  It is 
  1025.        intended to be run before another program that supports 
  1026.        homemade DAC's (many do).  The best way to use Setdac is to 
  1027.        create a batch file for each program you want to use it with, 
  1028.        for example:
  1029.  
  1030.            I:\>copy con mt.bat
  1031.            setdac
  1032.            multip
  1033.            ^Z
  1034.                    1 File(s) copied
  1035.  
  1036.        With Setdac.com and Multip.exe in my path, I can now type "MT" 
  1037.        to run MultiPlayer.  Assuming MultiPlayer is configured for the 
  1038.        Tandy chip (see below), I can now use the DAC as an output 
  1039.        device with it.
  1040.  
  1041.        It should be noted that writing sound data byte-by-byte to the 
  1042.        DAC is not the best way to use the chip.  Doing it this way 
  1043.        puts a severe strain on the processor, limiting the sampling 
  1044.        rate and consequently the sound quality you can achieve.  It is 
  1045.        preferable (and easier) to use the Tandy DAC in DMA mode with 
  1046.        the BIOS interface.  Setdac is just a hack to enable programs 
  1047.        that otherwise do not support the Tandy chip to use it, albeit 
  1048.        not the way it was meant to be used.
  1049.  
  1050.        Setdac is not a TSR; it just programs the DAC registers to put 
  1051.        the chip in byte-by-byte mode.  Once it is in this mode, any 
  1052.        program can use it as if it were a homemade or Covox DAC on a 
  1053.        parallel port, that is, by writing bytes to its port address.  
  1054.        Setdac will display the port address in hexadecimal when it is 
  1055.        run; write it down so you have it when you configure your 
  1056.        application for the Tandy chip.  Note that the port will not be 
  1057.        a standard LPT port address, so if your application limits you 
  1058.        to standard addresses, you're out of luck.
  1059.  
  1060.        Setdac takes no command-line arguments.  If it detects a Tandy 
  1061.        DAC in your system, it will display its port address:
  1062.  
  1063.            Tandy DAC at port 00C5h.
  1064.  
  1065.        If a Tandy DAC is not found, the following will be displayed:
  1066.  
  1067.            Tandy DAC not detected.
  1068.  
  1069.        Setdac exits without doing anything in this case.
  1070.  
  1071.        Setdac is only for sound output.  It is possible to set the DAC 
  1072.        to perform sound input byte-by-byte, if anyone comes up with a 
  1073.        reason to do so, but the register programming would be 
  1074.        different (i.e., you can't set the DAC to do both input and 
  1075.        output at the same time).
  1076.  
  1077.        Each application that you use Setdac with will have to be 
  1078.        configured for the Tandy chip.  How you do this will vary with 
  1079.        the application involved.  Generally, you will want to select 
  1080.        "DAC on LPT1:" or "Covox DAC" or such like for the output 
  1081.        device and set the "I/O port address" or "base address" to the 
  1082.        port number displayed by Setdac.  As with a homemade DAC, you 
  1083.        will also need to set the "sampling rate" or "output frequency" 
  1084.        to something your system will support.  For the best sound 
  1085.        quality, set the rate as high as possible, but remember that if 
  1086.        you set it too high your computer may lock up or crash.  There 
  1087.        is no firm guide on what you should set the sampling rate to; 
  1088.        it depends on the application and the speed of your machine.  
  1089.        Start with the lowest sampling rate your application allows and 
  1090.        increase it by increments until the program locks up the 
  1091.        machine, then set the rate to the highest value that works 
  1092.        without locking up.  I have a Tandy 1000TL with an 8MHz 80286.  
  1093.        The highest rate I can use with MultiPlayer is 6000Hz; with 
  1094.        ModEdit, the highest rate is 8000Hz.
  1095.  
  1096.        Configure MultiPlayer v.2.01 for the Tandy DAC as follows.  
  1097.        NOTE:  DO NOT USE MULTIPLAYER V.2.11.  THIS VERSION HAS A BUG 
  1098.        IN THE COVOX DAC DRIVER.  Type <alt>-F to bring up the "File" 
  1099.        menu and select "CLASSIC" for the Playing mode and "Covox Mono" 
  1100.        for the Output device.  Type <esc> to exit the "File" menu and 
  1101.        <alt>-S to bring up the "Setup" menu.  Set the Frequency Mix 
  1102.        Rate to "5000", which is the lowest rate MultiPlayer supports; 
  1103.        you will adjust it later.  Optionally, you may want to set Save 
  1104.        Memory Space for Mods to "NO" (this will speed up playback a 
  1105.        little) and increase the Initial Volume (the default is pretty 
  1106.        soft).  Leave the other stuff alone and hit <esc> to exit the 
  1107.        "Setup" menu.  Type <alt>-D to bring up the "Devices" menu and 
  1108.        set the Covox Left I/O Address to the value displayed by 
  1109.        Setdac.  Leave the other stuff alone and hit <esc> twice to 
  1110.        exit MultiPlayer; your settings will be saved.  Now run Setdac 
  1111.        and restart MultiPlayer.  Hit F3 and play a module.  The 
  1112.        Frequency Rate is displayed in the upper right corner.  Hit the 
  1113.        <up arrow> key to increase the rate.  Eventually, one of three 
  1114.        things will happen.  Either (1) MultiPlayer will knock the rate 
  1115.        back down; (2) the music will get horribly staticky; or (3) 
  1116.        your system will lock up.  You are looking for the highest 
  1117.        _sustainable_ rate.  Some parts of a module are easier to play 
  1118.        than others, and MultiPlayer may be able to achieve higher 
  1119.        rates on the "easy" parts, but you want to find the highest 
  1120.        rate that works for both "easy" and "hard" parts of the module.  
  1121.        This is trial and error.  When you find the rate you want, go 
  1122.        back into the "Setup" menu and set the Frequency Mix Rate to 
  1123.        the highest rate you can use.  Hit <esc> to exit MultiPlayer, 
  1124.        and make a batch file to run Setdac each time you run 
  1125.        MultiPlayer, as described above.
  1126.  
  1127.        Configure ModEdit v.3.01 for the Tandy DAC as follows.  Type C 
  1128.        to bring up the "Configure" menu, then type P to set the 
  1129.        Playback device.  Select "B: D/A converter on LPT1" and hit 
  1130.        <enter>.  Next type A to set Address of LPT ports.  Set the 
  1131.        LPT1: address to the value displayed by Setdac and hit <enter> 
  1132.        three times.  Type M to set the Mixing speed.  Type "5000" at 
  1133.        the prompt and hit <enter>.  This is the lowest mixing speed 
  1134.        ModEdit supports; as above, you will increase the speed later.  
  1135.        Now type S to Save configuration and hit <esc> to exit the 
  1136.        "Configure" menu.  Type F to bring up the "File" menu and X to 
  1137.        Exit ModEdit.  Run Setdac and restart ModEdit.  Use the "File" 
  1138.        menu to load a module (ModEdit comes with one) and use the 
  1139.        "Play" menu to play it.  Now it's trial and error to find the 
  1140.        right rate.  Unlike MultiPlayer, ModEdit does not fail 
  1141.        gracefully (i.e., knocking the rate back down) if you set it 
  1142.        too high.  It just locks up your machine - so when you find a 
  1143.        rate that works, use the "Configure" menu to set the Mixing 
  1144.        speed and Save configuration, then go on looking for a better 
  1145.        rate, keeping your finger poised over the ol' red button.  
  1146.        ModEdit is designed to let you go on editing the module while 
  1147.        it plays, so hit some keys while the module is playing to see 
  1148.        whether your machine will keep up.
  1149.  
  1150.        It is a hassle to find the right sampling rate for an 
  1151.        application, but you only have to do it once.  If you get 
  1152.        frustrated, take a break and walk in the woods (or corfields or 
  1153.        desert, whatever you have). :-)
  1154.  
  1155.  
  1156.        Piano
  1157.        -----
  1158.  
  1159.        Piano is a silly little program to play the SN76496-equivalent 
  1160.        circuitry on the IBM PC-Jr or Tandy 1000 or 2500 like a piano.  
  1161.        Unlike the other programs, this one does not require an SL/TL 
  1162.        or later model; this one uses the 3-voice chip.  The following 
  1163.        keys are used:
  1164.  
  1165.        Key             Note
  1166.         caps lock       not used
  1167.         left shift      A2
  1168.         A               A#2
  1169.         Z               B2
  1170.         S               not used
  1171.         X               C3
  1172.         D               C#3
  1173.         C               D3
  1174.         F               D#3
  1175.         V               E3
  1176.         G               not used
  1177.         B               F3
  1178.         H               F#3
  1179.         N               G3
  1180.         J               G#3
  1181.         M               A3
  1182.         K               A#3
  1183.         ,               B3
  1184.         L               not used
  1185.         .               C4
  1186.         ;               C#4
  1187.         /               D4
  1188.         '               D#4
  1189.         right shift     E4
  1190.         enter           not used
  1191.         `               not used
  1192.         tab             F4
  1193.         1               F#4
  1194.         Q               G4
  1195.         2               G#4
  1196.         W               A4
  1197.         3               A#4
  1198.         E               B4
  1199.         4               not used
  1200.         R               C5
  1201.         5               C#5
  1202.         T               D5
  1203.         6               D#5
  1204.         Y               E5
  1205.         7               not used
  1206.         U               F5
  1207.         8               F#5
  1208.         I               G5
  1209.         9               G#5
  1210.         O               A5
  1211.         0               A#5
  1212.         P               B5
  1213.         -               not used
  1214.         [               C6
  1215.         =               C#6
  1216.         ]               D6
  1217.         backspace       D#6
  1218.         \               E6
  1219.  
  1220.        <esc> exits the program.  In accordance with the sound chip's 
  1221.        capabilities, up to 3 notes can be played at a time.  Notes 
  1222.        given are American Standard Pitch, Equal Tempered Scale, or as 
  1223.        close as I can get; C4 (period) is middle C.  High notes are 
  1224.        not as close to the true frequency as low ones.
  1225.  
  1226.        This program always plays notes at the maximum volume; there is 
  1227.        no volume control.
  1228.  
  1229.        When the program starts, it displays the keyboard layout:
  1230.  
  1231.                         -- Tandy Piano --
  1232.  
  1233.           1   2   3       5   6       8   9   0       =  backsp
  1234.          F#4 G#4 A#4     C#5 D#5     F#5 G#5 A#5     C#6  D#6
  1235.  
  1236.        tab  Q   W   E   R   T   Y   U   I   O   P   [   ]   \
  1237.         F4  G4  A4  B4  C5  D5  E5  F5  G5  A5  B5  C6  D6  E6
  1238.  
  1239.               A       D   F       H   J   K       ;   '
  1240.              A#2     C#3 D#3     F#3 G#3 A#3     C#4 D#4
  1241.  
  1242.          shift  Z   X   C   V   B   N   M   ,   .   /  shift
  1243.           A2    B2  C3  D3  E3  F3  G3  A3  B3  C4  D4  E4
  1244.  
  1245.        Period is middle C.  Hit <escape> to halt the program.
  1246.  
  1247.        This program was written on a Tandy 1000TL with a 101-key 
  1248.        keyboard.  If you have another keyboard, the key for the top 
  1249.        note will be in the wrong place.  On the 83-key keyboard, the 
  1250.        top note is the \ key on the bottom row next to the left shift.  
  1251.        On the 84-key keyboard, the top note is the \ key on the top 
  1252.        row between = and backspace.  On the old Tandy keyboard (1000TX 
  1253.        and prior), the top note is the left arrow key.
  1254.  
  1255.        This program requires a PCjr or Tandy 1000 (or later Tandy) 
  1256.        with the Texas Instruments SN76496 3-voice sound chip or 
  1257.        equivalent circuitry.  The program will check to see if you 
  1258.        have the chip.  If not, it will display the following:
  1259.  
  1260.   This program requires a PC-Jr or Tandy 1000 or 2500 with a 3-voice tone
  1261.   generator.  It will not run on your machine.
  1262.  
  1263.  
  1264.        Work in Progress
  1265.        ----------------
  1266.  
  1267.        The following would also be nice:
  1268.  
  1269.            Recwav and Playwav should support Microsoft ADPCM 
  1270.            compression to save disk space.  I'm still looking for 
  1271.            information on the format.
  1272.  
  1273.            Support for the Tandy DAC in ModEdit, without having to use 
  1274.            Setdac and going through all the rigamarole above (I have 
  1275.            corresponded with the author of the module playing routines 
  1276.            in ModEdit about this).
  1277.  
  1278.            A program to convert .sng to .mod.  Since .sng files only 
  1279.            have 3 channels, it is impossible to convert .mod to .sng 
  1280.            without loss.
  1281.  
  1282.            A program to play music modules using the DMA capabilities 
  1283.            of the Tandy sound chip, rather than converting them to 
  1284.            .wav or using byte-by-byte transfers.  This should be able 
  1285.            to play 4-, 6- or 8-channel .mod's, to begin with.  (In 
  1286.            progress - still.  Actually, I haven't started it yet, but 
  1287.            I will soon. :-)
  1288.  
  1289.            There should be some information on programming the Tandy 
  1290.            joystick.
  1291.